﻿<cfcomponent>
<cfscript>
DB = 'chinalaohu';
dbt = 'user_deposit';
</cfscript>

<!--- 该方法放弃不用，而采用存储过程方式 --->
<cffunction name="userdeposit" access="public" returntype="query">
	<cfquery datasource="#DB#" name="userdeposit">
  select *
  from #dbt#
  WHERE 
  uid = #uid#
  order by did desc
  </cfquery>
  <cfreturn userdeposit>
</cffunction>


<!--- 调用存储过程获取可用保证金余额 --->
<cffunction name="getbzjvalue" access="remote" returntype="numeric">
<cfstoredproc procedure="pro_get_bzj_keyong" dataSource="#DB#"> 
    <cfprocparam type="IN" CFSQLType="cf_sql_varchar" value="#uid#" > 
    <cfprocparam type="OUT" CFSQLType="cf_sql_integer" variable="res"> 
</cfstoredproc> 
  <cfreturn res>
</cffunction>

<!--- 调用存储过程获取冻结保证金余额 --->
<cffunction name="get_dj_bzjvalue" access="remote" returntype="numeric">
<cfstoredproc procedure="pro_get_bzj_dongjie" dataSource="#DB#"> 
    <cfprocparam type="IN" CFSQLType="cf_sql_varchar" value="#uid#" > 
    <cfprocparam type="OUT" CFSQLType="cf_sql_integer" variable="res"> 
</cfstoredproc> 
  <cfreturn res>
</cffunction>


<!--- 调用存储过程获取可用保证金额度 --->
<cffunction name="getbzj_ed" access="remote" returntype="numeric">
<cfstoredproc procedure="new_pro_get_user_ok_quota" dataSource="#DB#"> 
    <cfprocparam type="IN" CFSQLType="cf_sql_varchar" value="#uid#" > 
    <cfprocparam type="OUT" CFSQLType="cf_sql_integer" variable="res"> 
</cfstoredproc> 
  <cfreturn res>
</cffunction>

<!--- 调用存储过程获取冻结保证金额度 --->
<cffunction name="getbzj_dj_ed" access="remote" returntype="numeric">
<cfstoredproc procedure="pro_get_user_dj_quota" dataSource="#DB#"> 
    <cfprocparam type="IN" CFSQLType="cf_sql_varchar" value="#uid#" > 
    <cfprocparam type="OUT" CFSQLType="cf_sql_integer" variable="res"> 
</cfstoredproc> 
  <cfreturn res>
</cffunction>

</cfcomponent>